package be.tihh.mgmt.tasks;

import be.tihh.mgmt.gui.xml.app.RunCommand;

public class RegistryReader extends ComputerTask {

    public String getName() {
        return "RegistryReader";
    }

    @Override
    public void execute() {
        super.execute();
        System.out.println("1");
        RemoteRunner runner = new RemoteRunner(new RunCommand("regedit /e:a test.reg \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\""));
        System.out.println("2");
        runner.initialize(computer);
        System.out.println("3");
        runner.execute();
        System.out.println("4 - regedit cmd done");
//        runner = new RemoteRunner(new RunCommand("cmd /c type test.reg"));
        runner = new RemoteRunner(new RunCommand("cmd /c dir c:\\*.*"));
        System.out.println("5");
        runner.initialize(computer);
        System.out.println("6");
        runner.execute();
        System.out.println("7");
        String result = runner.getTaskStatus().getStandardOutput();
        System.out.println("result = " + result);
    }
}
